/**
 * 
 */
package hu.gbalage.owlforms.api;

import hu.gbalage.owlforms.api.data.FieldData;

/**
 * @author Grill Balazs (balage.g@gmail.com)
 *
 */
public interface FieldCardinality {

	/**
	 * Returns true if this cardinality allows to add one
	 * more values to the given field data
	 * @param field
	 * @return
	 */
	public boolean canAddMore(FieldData fielddata);
	
	/**
	 * @param fielddata
	 * @return true if sufficient values are given
	 */
	public boolean isSufficient(FieldData fielddata);
	
	/**
	 * @return minimal number of given values
	 */
	public int getMin();
	
	/**
	 * @return maximal number of given values, or Integer.MAX_VALUE, 
	 * if there is no upper limit.
	 */
	public int getMax();
	
}
